package edu.sjb.map;

import java.util.ArrayList;

import edu.sjb.characters.GameCharacter;
import edu.sjb.characters.Mario;
import edu.sjb.map.prizes.PowerUp;

public class ListLevel extends Level {
	protected ArrayList<GameCharacter> characters;
	protected ArrayList<MapObject> entities;
	protected ArrayList<PowerUp> powerUps;

	public ListLevel() {
		characters = new ArrayList<GameCharacter>();
		entities = new ArrayList<MapObject>();
		powerUps = new ArrayList<PowerUp>();
	}

	@Override
	public void addCharacter(GameCharacter p) {

		characters.add(p);
	}

	@Override
	public void addEntity(MapObject o) {

		entities.add(o);
	}

	@Override
	public void addPowerUp(PowerUp i) {

		powerUps.add(i);
	}

	@Override
	public void addMario(Mario elMario) {

		characters.add(0, elMario);
	}

	@Override
	public void removeCharacter(GameCharacter p) {

		characters.remove(p);
	}

	@Override
	public void removeEntity(MapObject o) {

		entities.remove(o);
	}

	@Override
	public void removePowerUp(PowerUp i) {

		powerUps.remove(i);
	}

	@Override
	public ArrayList<GameCharacter> characterCollection() {

		return characters;
	}

	@Override
	public ArrayList<MapObject> objectCollection() {

		return entities;
	}

	@Override
	public ArrayList<PowerUp> powerupCollection() {

		return powerUps;
	}

	@Override
	public Mario mario() {

		return (Mario) characters.get(0);
	}

}
